import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import echarts from './views/charts/echarts.vue'
//==================导入.vue文件=======================
import Manager from "./views/org/Manager.vue";
import Permission from "./views/auth/Permission";
import Role from "./views/auth/Role";
import Menus from "./views/auth/Menus";
import NotPermission from './views/403.vue'
import ShopRegister from "./views/ShopRegister.vue";
import OrderInfo from "./views/order/OrderInfo.vue";
import Shop from "./views/audit/Shop.vue";
import Goods from "./views/audit/Goods.vue";
import Customerservice from "./views/feedback/Customerservice.vue";
import Bill from "./views/audit/Bill";
import Poster from "./views/audit/Poster";
import Type from "./views/audit/Type";
import BillByShop from "./views/audit/BillByShop";

let routes = [
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/shopRegister',
        component: ShopRegister,
        name: '',
        hidden: false
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    {
        path: '/',
        component: Home,
        name: '',
        hidden: true,
        children: [
            {path: '/403',component: NotPermission}
        ]
    },
    // {
    //     path: '/',
    //     component: Home,
    //     name: 'Charts',
    //     iconCls: 'fa fa-bar-chart',
    //     leaf: true,
    //     children: [
    //         { path: '/echarts', component: echarts, name: '首页' }
    //     ]
    // },
    {
        path: '/',
        component: Home,
        name: '账号管理',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/manager', component: Manager, name: '账号列表' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '权限管理',
        iconCls: 'el-icon-message',
        children: [
            { path: '/permission', component: Permission, name: '权限列表' },
            { path: '/role', component: Role, name: '角色列表' },
            { path: '/menu', component: Menus, name: '菜单列表' }
        ]
    },
    //{ path: '/main', component: Main },
    {
        path: '/',
        component: Home,
        name: '店铺管理',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/shop', component: Shop, name: '店铺列表' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '商品管理',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/goods', component: Goods, name: '商品列表' },
            { path: '/type', component: Type, name: '商品类别' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '订单管理',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/order', component: OrderInfo, name: '订单列表' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '用户反馈',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/customerservice', component: Customerservice, name: '反馈列表' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '账单界面',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/bill', component: Bill, name: '账单列表' },
            { path: '/billByShop', component: BillByShop, name: '商家账单列表' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '公告界面',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/poster', component: Poster, name: '公告列表' },
        ]
    },

    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;
